// Msg.h

#pragma once
#ifndef MSG_H_INCLUDED
#define MSG_H_INCLUDED

class Msg
{
public:

	enum
	{
		MAX_TEXT=64,
		MAX_HISTORY=32
	};

	int m_iMsgID;
	int m_iSenderIP;
	char m_sText[MAX_TEXT];
	int m_aiHistory[MAX_HISTORY];
	
	static int GetLocalSenderIP();

	Msg();

	Msg(const Msg& p_xM);
	Msg& operator=(const Msg& p_xM);

	void Init(const char* p_sText);
	void Print() const;
	bool AddHistory(int p_iIP);
	bool IsInHistory(int p_iIP) const;
};


#endif // MSG_H_INCLUDED
